package com.example.forum.services;

import com.example.forum.model.Message;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface IMessageService {
    //站内信
    void create (Message message);

    Integer selectUnreadCount (Long userId);

    List<Message> selectByReceiveUserId (Long receiveUserId);

    //读取站内信
    Message selectById(Long id);

    //根据Id更新
    void updateStateById(Long id, Byte state);

    @Transactional
    void reply (Long repliedId, Message message);


}
